<?xml version='1.0' encoding='UTF-8' ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:p="http://primefaces.prime.com.tr/ui">

<h:head>
<title>Upload de Arquivos com primefaces</title>
</h:head>

<h:body>
	<h:form enctype="multipart/form-data" >
		
		<p:fileUpload auto="true" 
		label="XD" 
		allowTypes="png" 
		multiple="false" 
		description="Imagem" 
		update="idarquivo, idimagem, idimagem2" 
		fileUploadListener="#{fileUploadControllerXD.fileUploadAction}" /> <br/>
		
		
		
		
		Arquivo selecionado: <h:outputText id="idarquivo" value="#{fileUploadControllerXD.nomeArquivoSelecionado}"/>
		<p:commandButton value="Atualizar" actionListener="#{fileUploadControllerXD.fazNada}" ajax="false" update="idimagem" immediate="true"></p:commandButton>
		<br/><br/>
		
		<p:graphicImage id="idimagem" value="#{fileUploadControllerXD.imagem}" cache="false" />
		
		
		
		<p:graphicImage id="xd" value="file:///C:/Users/GUEDES/Pictures/home.png"></p:graphicImage>
		
		<p:graphicImage id="xd2" value="C:/Users/GUEDES/workspace/domoticWEB/WebContent/domotic/resources/upload/Use Case.png"></p:graphicImage>
		
		<p:graphicImage id="xd3" value="/domotic/resources/upload/Use Case.png"></p:graphicImage>
		<p:graphicImage id="xd4" value="/domotic/resources/upload/xd.png"></p:graphicImage>
		<p:graphicImage id="xd5" value="/domotic/resources/upload/blue.jpg"></p:graphicImage>
		<p:graphicImage id="xd6" value="/domotic/resources/upload/home.png"></p:graphicImage>
		
		<h:graphicImage url="C:/Users/GUEDES/Pictures/home.png" ></h:graphicImage>
		
		<img src="file:///C:/Users/GUEDES/Pictures/home.png" />
		
		
	</h:form>
</h:body>
</html>